package com.gbk.clickhouseservicestruct.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.myweb.ck.mapping.ChTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * @Author: WJ
 * @Description:
 * @Date: create in 2023/2/22 10:56
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ChTable(name = "tig.T_TIG_DEVICE_STATUS_RECORD")
public class TIG_DEVICE_STATUS_RECORD {


    /**
     * ID 主键 唯一 报警表id
     */
    private String id;


    /**
     * 路口ID
     */
    private String crossId;

    /**
     * 数据存储时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date daatime;

    /**
     * 设备IP
     */
    private String ip;

    private int status;

}
